package kr.hkit.powerjava.chapter26.dto;

public class Department implements Comparable<Department>{
	private int deptNo;
	private String deptName;
	private int floor;

	public Department() {}
	public Department(int deptNo, String deptName) {
		this.deptNo = deptNo;
		this.deptName = deptName;
	}

	public Department(int deptNo) {
		this.deptNo = deptNo;
	}
	public Department(int deptNo, String deptName, int floor) {
		this.deptNo = deptNo;
		this.deptName = deptName;
		this.floor = floor;
	}
	
	public int getDeptNo() { return deptNo;	}
	public String getDeptName() { return deptName; }
	public int getFloor() { return floor; }
	public void setDeptNo(int deptNo) { this.deptNo = deptNo; }
	public void setDeptName(String deptName) { this.deptName = deptName; }
	public void setFloor(int floor) { this.floor = floor; }
	
	@Override
	public String toString() {
		return String.format("%3s\t%5s\t%3s", deptNo, deptName, floor);
	}
	@Override
	public int compareTo(Department o) {
		return deptNo - o.deptNo;
	}
}